'use strict';

module.exports = {
    up: async(queryInterface, Sequelize) => {
        const { INTEGER, DATE, STRING } = Sequelize;
        // 创建表
        await queryInterface.createTable('consultation', {
            id: {
                type: INTEGER(20).UNSIGNED,
                primaryKey: true,
                autoIncrement: true
            },
            courseimage: {
                type: STRING(500),
                allowNull: false,
                defaultValue: '',
                comment: '团队咨询背景图',
            },
            coursename: {
                type: STRING(130),
                allowNull: false,
                defaultValue: '',
                comment: '团队主题',
            },
            coursecopywriting: {
                type: STRING(500),
                allowNull: false,
                defaultValue: '',
                comment: '团队文案',
            },
            courseharvest: {
                type: STRING(500),
                allowNull: false,
                defaultValue: '',
                comment: '课程收获',
            },
            courseinformation: {
                type: STRING(500),
                allowNull: false,
                defaultValue: '',
                comment: '报名信息',
            },
            courseinformation: {
                type: STRING(500),
                allowNull: false,
                defaultValue: '',
                comment: '报名信息',
            },
            attentionevent: {
                type: STRING(500),
                allowNull: false,
                defaultValue: '',
                comment: '注意事件',
            },
            courseprice: {
                type: STRING(20),
                allowNull: false,
                defaultValue: '',
                comment: '课程价格',
            },
            coursetype: {
                type: INTEGER(1),
                allowNull: false,
                comment: '分类0团队咨询,1心理沙龙',
            },
            teacherarea: {
                type: INTEGER(1),
                allowNull: false,
                defaultValue: '',
                comment: '咨询师地区',
            },
            created_at: DATE,
            updated_at: DATE
        });
    },

    down: async queryInterface => {
        await queryInterface.dropTable('consultation');
    }
};